#include<iostream>
#include<assert.h>
using namespace std;
class Date
{
public:
void Print()
{
cout << _year << "-" << _month << "-" << _day << endl;
}
Date(int num = 20021006)
:_year(num / 10000)
, _month(((num / 1000) % 10) * 10 + (num / 100 % 10))
, _day((num / 10 % 10) * 10 + (num % 10))
{}
//d1 - d2
bool operator<(const Date& d)
{
    if (_year < d._year)
    {
        return true;
    }
    else if (_year == d._year)
    {
        if (_month < d._month)
        {
            return true;
        }
        else if (_month == d._month)
        {
            if (_day < d._day)
            {
                return true;
            }
        }
    }
    else
    {
        return false;
    }
}

int GetMonthDay(int year, int month)
{
    assert(month > 0 && month < 13);
    int MonthArray[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
    if ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)))
    {
        MonthArray[2] = 29;
    }
    return MonthArray[month];
}
bool operator<=(const Date& d)
{
    return *this < d || *this == d;
}
bool operator>(const Date& d)
{
    return !(*this <= d);
}
bool operator>=(const Date& d)
{
    return !(*this < d);
}
bool operator==(const Date& d)
{
    return _year == d._year && _month == d._month && _day == d._day;
}
bool operator!=(const Date& d)
{
    return !(*this == d);
}

Date& operator+=(int day)
{
    _day += day;
    while (_day > GetMonthDay(_year, _month))
    {
        _day -= GetMonthDay(_year, _month);
        ++_month;
        if (_month == 13)
        {
            ++_year;
            _month = 1;
        }
    }
    return *this;
}

Date& operator++()
{
    *this += 1;
    return *this;
}

int operator-(const Date& d)
{
    Date max = *this;
    Date min = d;
    if (*this < d)
    {
        max = d;
        min = *this;
    }
    int n = 0;
    while (min != max)
    {
        ++min;
        ++n;
    }
    return n;
}

public:
int num=20021006;
int _year=2004;
int _month=1;
int _day=6;

};
void DateTest01()
{
Date d1(20021006);
Date d2(20240802);
cout << (d1 - d2) << endl;
}
void DateTest02()
{
int m = 0;
int n = 0;
cin >> m;
cin >> n;
Date d1(m);
Date d2(n);
cout << (d1 - d2) << endl;
}
int main()
{
DateTest02();    
}
